pygrub: improve grub 2 support
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 26 Jan 2010 15:54:40 +0000 (15:54 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 26 Jan 2010 15:54:40 +0000 (15:54 +0000)
commitfd607bf0001547d1ee5e84ba7ed9977f631d0fb0
tree5fe7c47f63b4ea95e7fc42c77f550963579aebb4
parent83f510f16bd73a52cf1cc1e5864b2fb30eeb7b29
pygrub: improve grub 2 support

* The "default" value can be a quoted string (containing an integer)
  so strip the quotes before interpreting.
* The "set" command takes a variable with an arbitrary name so instead
  of whitelisting the ones to ignore simply silently accept any set
  command with an unknown variable.
* Ignore the echo command.
* Handle the function { ... } syntax. Previously pygrub would error
  out with a syntax error on the closing "}" because it thought it was
  the closing bracket of a menuentry.

This makes pygrub2 work with the configuration files generated by
Debian Squeeze today.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
tools/pygrub/src/GrubConf.py